home *** CD-ROM | disk | FTP | other *** search
- Adding Guidelines
- =================
-
- This file is to help define what the goals of this package are as far
- as adding new creations is concerned.
-
- 1) All creations (objects, textures, surfaces) are defined so as to
- not add to the memory requirements for a scene that does not specifically ask
- for something pertaining to that creation. Thus the creations only take up
- memory in the C-preprocessor. The current way of doing this is to "#define"
- everything and only when there is a call to a specific creation will actual
- rayshade "code" be produced. An easy way to test this is to type in
- "echo '#include "defs.rh"' | cpp -l<path to rsdefs dir> -P | sort -u"
- and the only thing that should come out is blank lines.
-
- 2) All creations that are "logically" able to be implemented by
- name or as an instance are defined such that they can be used in either manner.
- Right now, the only things in rayshade that can be implemented in such a manner
- are surfaces and objects. All creations that can be implemented as instances
- or by name should have a "prefix" argument as the first argument that allows a
- user to add the appropriate code for naming the creation. This means that for
- surfaces, the "prefix" will expect "surface some_name" or null. For objects,
- the "prefix" will expect "name some_obj_name" or null. If the parameter is
- left blank, then an instance of the creation will be created.
-
- 3) All objects can be implemented inside aggregates.
-
- 4) All objects can be followed by transformation calls that will
- transform the object in a logical manner. For example if "RSPtoothbrush(,s1)"
- will produce an instance of a toothbrush, then "RSPtoothbrush(,s1)
- translate 2 3 4" will translate the whole toothbrush (as opposed to some
- _part_ of the toothbrush).
-
- 5) Names are as simple and logical as possible.
-
-